import java.util.Scanner;

public class GitTest {
    public static void main(String[] args) throws Exception { //B、声明异常
        //1、自动抛出异常
        //A、捕获并处理
        try {
            Class.forName("");//a. checkException
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (ArithmeticException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            //资源回收代码
            System.out.println("我要回收资源了");
        }

        Scanner input = new Scanner(System.in);
        int num1 = input.nextInt();
        int num2 = input.nextInt(); //b. RuntimeException 0
        System.out.println(num1 / num2);
        System.out.println("计算结束");


        throw new Exception();//2、手动抛出异常
    }
}
